+2003-11-17 Mark McLoughlin <mark@skynet.ie>
+
+ Patch from Jaiserca <jaiserca@inf.upv.es> to add a
+ "use_markup" property. See bug #124449.
+
+ * gtk/gtkexpander.c:
+ (gtk_expander_class_init),
+ (gtk_expander_init), (gtk_expander_set_property),
+ (gtk_expander_get_property), (gtk_expander_set_label),
+ (gtk_expander_set_use_markup), (gtk_expander_get_use_markup):
+ Add a "use_markup" property and use it when creating the
+ child label.
+
Mon Nov 17 12:58:32 2003 Kristian Rietveld <kris@gtk.org>
Temporary size requisition fix. Will fix it for real tonight.
+2003-11-17 Mark McLoughlin <mark@skynet.ie>
+
+ Patch from Jaiserca <jaiserca@inf.upv.es> to add a
+ "use_markup" property. See bug #124449.
+
+ * gtk/gtkexpander.c:
+ (gtk_expander_class_init),
+ (gtk_expander_init), (gtk_expander_set_property),
+ (gtk_expander_get_property), (gtk_expander_set_label),
+ (gtk_expander_set_use_markup), (gtk_expander_get_use_markup):
+ Add a "use_markup" property and use it when creating the
+ child label.
+
Mon Nov 17 12:58:32 2003 Kristian Rietveld <kris@gtk.org>
Temporary size requisition fix. Will fix it for real tonight.
+2003-11-17 Mark McLoughlin <mark@skynet.ie>
+
+ Patch from Jaiserca <jaiserca@inf.upv.es> to add a
+ "use_markup" property. See bug #124449.
+
+ * gtk/gtkexpander.c:
+ (gtk_expander_class_init),
+ (gtk_expander_init), (gtk_expander_set_property),
+ (gtk_expander_get_property), (gtk_expander_set_label),
+ (gtk_expander_set_use_markup), (gtk_expander_get_use_markup):
+ Add a "use_markup" property and use it when creating the
+ child label.
+
Mon Nov 17 12:58:32 2003 Kristian Rietveld <kris@gtk.org>
Temporary size requisition fix. Will fix it for real tonight.
+2003-11-17 Mark McLoughlin <mark@skynet.ie>
+
+ Patch from Jaiserca <jaiserca@inf.upv.es> to add a
+ "use_markup" property. See bug #124449.
+
+ * gtk/gtkexpander.c:
+ (gtk_expander_class_init),
+ (gtk_expander_init), (gtk_expander_set_property),
+ (gtk_expander_get_property), (gtk_expander_set_label),
+ (gtk_expander_set_use_markup), (gtk_expander_get_use_markup):
+ Add a "use_markup" property and use it when creating the
+ child label.
+
Mon Nov 17 12:58:32 2003 Kristian Rietveld <kris@gtk.org>
Temporary size requisition fix. Will fix it for real tonight.
+2003-11-17 Mark McLoughlin <mark@skynet.ie>
+
+ Patch from Jaiserca <jaiserca@inf.upv.es> to add a
+ "use_markup" property. See bug #124449.
+
+ * gtk/gtkexpander.c:
+ (gtk_expander_class_init),
+ (gtk_expander_init), (gtk_expander_set_property),
+ (gtk_expander_get_property), (gtk_expander_set_label),
+ (gtk_expander_set_use_markup), (gtk_expander_get_use_markup):
+ Add a "use_markup" property and use it when creating the
+ child label.
+
Mon Nov 17 12:58:32 2003 Kristian Rietveld <kris@gtk.org>
Temporary size requisition fix. Will fix it for real tonight.
PROP_EXPANDED,
PROP_LABEL,
PROP_USE_UNDERLINE,
+ PROP_USE_MARKUP,
PROP_PADDING,
PROP_LABEL_WIDGET
};
guint expanded : 1;
guint use_underline : 1;
+ guint use_markup : 1;
guint button_down : 1;
guint prelight : 1;
};
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (gobject_class,
+ PROP_USE_MARKUP,
+ g_param_spec_boolean ("use_markup",
+ _("Use markup"),
+ _("The text of the label includes XML markup. See pango_parse_markup()"),
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
g_object_class_install_property (gobject_class,
PROP_PADDING,
g_param_spec_int ("spacing",
priv->expanded = FALSE;
priv->use_underline = FALSE;
+ priv->use_markup = FALSE;
priv->button_down = FALSE;
priv->prelight = FALSE;
}
case PROP_USE_UNDERLINE:
gtk_expander_set_use_underline (expander, g_value_get_boolean (value));
break;
+ case PROP_USE_MARKUP:
+ gtk_expander_set_use_markup (expander, g_value_get_boolean (value));
+ break;
case PROP_PADDING:
gtk_expander_set_spacing (expander, g_value_get_int (value));
break;
case PROP_USE_UNDERLINE:
g_value_set_boolean (value, priv->use_underline);
break;
+ case PROP_USE_MARKUP:
+ g_value_set_boolean (value, priv->use_markup);
+ break;
case PROP_PADDING:
g_value_set_int (value, priv->spacing);
break;
child = gtk_label_new (label);
gtk_label_set_use_underline (GTK_LABEL (child), expander->priv->use_underline);
+ gtk_label_set_use_markup (GTK_LABEL (child), expander->priv->use_markup);
gtk_widget_show (child);
gtk_expander_set_label_widget (expander, child);
return expander->priv->use_underline;
}
+/**
+ * gtk_expander_set_use_markup:
+ * @expander: a #GtkExpander
+ * @use_markup: %TRUE if the label's text should be parsed for markup
+ *
+ * Sets whether the text of the label contains markup in <link
+ * linkend="PangoMarkupFormat">Pango's text markup
+ * language</link>. See gtk_label_set_markup().
+ *
+ * Since: 2.4
+ **/
+void
+gtk_expander_set_use_markup (GtkExpander *expander,
+ gboolean use_markup)
+{
+ GtkExpanderPrivate *priv;
+
+ g_return_if_fail (GTK_IS_EXPANDER (expander));
+
+ priv = expander->priv;
+
+ use_markup = use_markup != FALSE;
+
+ if (priv->use_markup != use_markup)
+ {
+ priv->use_markup = use_markup;
+
+ if (priv->label_widget && GTK_IS_LABEL (priv->label_widget))
+ gtk_label_set_use_markup (GTK_LABEL (priv->label_widget), use_markup);
+
+ g_object_notify (G_OBJECT (expander), "use_markup");
+ }
+}
+
+/**
+ * gtk_expander_get_use_markup:
+ * @expander: a #GtkExpander
+ *
+ * Returns whether the label's text is interpreted as marked up with
+ * the <link linkend="PangoMarkupFormat">Pango text markup
+ * language</link>. See gtk_expander_set_use_markup ().
+ *
+ * Return value: %TRUE if the label's text will be parsed for markup
+ *
+ * Since: 2.4
+ **/
+gboolean
+gtk_expander_get_use_markup (GtkExpander *expander)
+{
+ g_return_val_if_fail (GTK_IS_EXPANDER (expander), FALSE);
+
+ return expander->priv->use_markup;
+}
+
/**
* gtk_expander_set_label_widget:
* @expander: a #GtkExpander